<script setup>
  defineEmits(['search'])
</script>

<template>
  <div class="search-view">
    <div class="left">
      <el-form inline size="default" label-position="left">
        <el-row>
          <slot />
        </el-row>
      </el-form>
    </div>
    <div class="right">
      <el-button icon="search" size="default" type="primary" @click="$emit('search')">查询</el-button>
    </div>
  </div>
</template>

<style scoped lang="scss">
  .search-view {
    display: flex;
    justify-content: space-between;
    .left {
      width: 80%;
    }
    .right {
      width: 20%;
      text-align: center;
    }
    .search-input {
      width: 100% !important;
    }
  }
</style>
